package com.appspot.finajjarane.framework.service;

import java.util.List;

import com.appspot.finajjarane.framework.generic.IGenericService;
import com.appspot.finajjarane.framework.models.ArticleModel;

public interface IArticleService extends IGenericService {

	/**
	 * Create a new artcile
	 * @return True if article created, False otherwise
	 */
	public boolean articleCreateNew(final ArticleModel articleModel) throws Exception;

	/**
	 * Update an existing article
	 * @param article
	 * @return True if article updated, False otherwise
	 */
	public boolean articleUpdate(final ArticleModel articleModel) throws Exception;


	/**
	 * Remove an existing article
	 * @param article
	 * @return True if article removed, False otherwise
	 */
	public boolean articleRemove(final Long articleId) throws Exception;


	/**
	 * Get a limited list of article (per page)
	 * @param page
	 * @param maxPerPage
	 * @return list of limited founded artcile (per page)
	 */
	public List<ArticleModel> getArticlesList(final int page, final int maxPerPage , final String lang) throws Exception;


	/**
	 * Get all articles
	 * Be careful this method can be used only if there are some articles,
	 * 	or, maybe, to perform some tests.
	 * @return list of all articles
	 */
	public List<ArticleModel> getArticlesAll() throws Exception;


	/**
	 * Get an article by id
	 * @param id
	 * @return articleModel object, by getting the article entity for the corresponding Id, and converting it
	 */
	public ArticleModel getArticle(final Long id) throws Exception;

	/**
	 * Get articles count
	 * @param lang
	 * @return int
	 */
	public int getArticlesCount(final String lang) throws Exception;

}